﻿using System.Web.Mvc;
using Storytelling.Entidades.VTR;
using Storytelling.Modelos.VTR;
using Storytelling.Negocio;
using Storytelling.Utils;

namespace Storytelling.Controllers
{
    public class DisciplinaController : BaseCrudController<Disciplina, DisciplinaFormModel>
    {
        protected override IServico<Disciplina, DisciplinaFormModel> Servico
        {
            get { return Servicos.Disciplina; }
        }

        protected override void EscolherCarregamento(Carga<Disciplina> carga, TipoCarregamento tipo)
        {
            carga.Carregar(ent => ent.Agrupamento);
        }

        [AutorizarEditor]
        public override ActionResult Form(long? id)
        {
            return base.Form(id);
        }

        [AutorizarEditor]
        public override ActionResult Form(DisciplinaFormModel model)
        {
            return base.Form(model);
        }

        [AutorizarEditor]
        public override ActionResult Excluir(long? id)
        {
            return base.Excluir(id);
        }
    }
}
